package com.fowo.api.model.product.sub;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.NumberFormat;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.fowo.api.common.excel.ImageConvert;
import com.fowo.api.sys.entity.SysFile;
import java.util.List;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/** 组合产品包含产品 导入导出辅助模型 */
@Getter
@Setter
public class ProductSubExcelPo {

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "所属产品")
  private String productIdName;

  @ExcelIgnore
  @ExcelProperty(value = "所属产品")
  private Long productId;

  @ExcelProperty(value = "图片", converter = ImageConvert.class)
  private List<SysFile> picUrl;

  @Size(max = 50, message = "产品长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "产品")
  private String subIdName;

  @ExcelIgnore
  @ExcelProperty(value = "产品")
  private Long subId;

  @Size(max = 50, message = "SKU长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "SKU")
  private String sku;

  @Size(max = 50, message = "型号长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "型号")
  private String model;

  @Size(max = 50, message = "单位长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "单位")
  private String unit;

  @ExcelProperty(value = "采购交期")
  private Integer purchasingDeliveryTime;

  @NumberFormat("0.00")
  @ExcelProperty(value = "采购成本")
  private java.math.BigDecimal procurementCost;

  @ExcelProperty(value = "产品长度")
  private java.math.BigDecimal productLength;

  @ExcelProperty(value = "产品宽度")
  private java.math.BigDecimal productWidth;

  @ExcelProperty(value = "产品高度")
  private java.math.BigDecimal productHeight;

  @ExcelProperty(value = "产品净重")
  private java.math.BigDecimal productNet;

  @ExcelProperty(value = "单品毛重")
  private java.math.BigDecimal productGross;

  @Size(max = 50, message = "产品材质长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "产品材质")
  private String material;

  @ExcelProperty(value = "数量")
  private Long num;
}
